Integrand size = 21, antiderivative size = 144 \[ \int \frac {\sec (e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=\frac {\left (8 a^2+8 a b+3 b^2\right ) \text {arctanh}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+b}}\right )}{8 a^{5/2} (a+b)^{5/2} f}-\frac {b \cos ^2(e+f x) \sin (e+f x)}{4 a (a+b) f \left (a+b-a \sin ^2(e+f x)\right )^2}-\frac {3 b (2 a+b) \sin (e+f x)}{8 a^2 (a+b)^2 f \left (a+b-a \sin ^2(e+f x)\right )} \]
1/8*(8*a^2+8*a*b+3*b^2)*arctanh(sin(f*x+e)*a^(1/2)/(a+b)^(1/2))/a^(5/2)/(a +b)^(5/2)/f-1/4*b*cos(f*x+e)^2*sin(f*x+e)/a/(a+b)/f/(a+b-a*sin(f*x+e)^2)^2 -3/8*b*(2*a+b)*sin(f*x+e)/a^2/(a+b)^2/f/(a+b-a*sin(f*x+e)^2)
Result contains complex when optimal does not.
Time = 5.45 (sec) , antiderivative size = 927, normalized size of antiderivative = 6.44 \[ \int \frac {\sec (e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=\frac {(a+2 b+a \cos (2 (e+f x))) \sec ^5(e+f x) \left (-2 i \left (8 a^2+8 a b+3 b^2\right ) \arctan \left (\frac {(a+b) \sin (e)}{(a+b) \cos (e)-\sqrt {a} \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} (\cos (2 e)+i \sin (2 e)) \sin (e+f x)}\right ) (a+2 b+a \cos (2 (e+f x)))^2 \sec (e+f x) (\cos (e)-i \sin (e))+\left (8 a^2+8 a b+3 b^2\right ) (a+2 b+a \cos (2 (e+f x)))^2 \log \left (a+2 (a+b) \cos (2 e)-a \cos (2 (e+f x))-2 i a \sin (2 e)-2 i b \sin (2 e)+2 \sqrt {a} \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (f x)+2 \sqrt {a} \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (2 e+f x)\right ) \sec (e+f x) (\cos (e)-i \sin (e))-\left (8 a^2+8 a b+3 b^2\right ) (a+2 b+a \cos (2 (e+f x)))^2 \log \left (-a-2 (a+b) \cos (2 e)+a \cos (2 (e+f x))+2 i a \sin (2 e)+2 i b \sin (2 e)+2 \sqrt {a} \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (f x)+2 \sqrt {a} \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (2 e+f x)\right ) \sec (e+f x) (\cos (e)-i \sin (e))+2 \left (8 a^2+8 a b+3 b^2\right ) \arctan \left (\frac {2 \sin (e) \left (i a+i b+i (a+b) \cos (2 e)+\sqrt {a} \sqrt {a+b} \cos (f x) \sqrt {(\cos (e)-i \sin (e))^2}-\sqrt {a} \sqrt {a+b} \cos (2 e+f x) \sqrt {(\cos (e)-i \sin (e))^2}+a \sin (2 e)+b \sin (2 e)-i \sqrt {a} \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (f x)-i \sqrt {a} \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \sin (2 e+f x)\right )}{i (a+3 b) \cos (e)+i (a+b) \cos (3 e)+i a \cos (e+2 f x)+i a \cos (3 e+2 f x)+3 a \sin (e)+b \sin (e)+a \sin (3 e)+b \sin (3 e)+a \sin (e+2 f x)-a \sin (3 e+2 f x)}\right ) (a+2 b+a \cos (2 (e+f x)))^2 \sec (e+f x) (i \cos (e)+\sin (e))+32 \sqrt {a} b^2 (a+b)^{3/2} \sqrt {(\cos (e)-i \sin (e))^2} \tan (e+f x)-8 \sqrt {a} b \sqrt {a+b} (8 a+5 b) (a+2 b+a \cos (2 (e+f x))) \sqrt {(\cos (e)-i \sin (e))^2} \tan (e+f x)\right )}{256 a^{5/2} (a+b)^{5/2} f \left (a+b \sec ^2(e+f x)\right )^3 \sqrt {(\cos (e)-i \sin (e))^2}} \]
((a + 2*b + a*Cos[2*(e + f*x)])*Sec[e + f*x]^5*((-2*I)*(8*a^2 + 8*a*b + 3* b^2)*ArcTan[((a + b)*Sin[e])/((a + b)*Cos[e] - Sqrt[a]*Sqrt[a + b]*Sqrt[(C os[e] - I*Sin[e])^2]*(Cos[2*e] + I*Sin[2*e])*Sin[e + f*x])]*(a + 2*b + a*C os[2*(e + f*x)])^2*Sec[e + f*x]*(Cos[e] - I*Sin[e]) + (8*a^2 + 8*a*b + 3*b ^2)*(a + 2*b + a*Cos[2*(e + f*x)])^2*Log[a + 2*(a + b)*Cos[2*e] - a*Cos[2* (e + f*x)] - (2*I)*a*Sin[2*e] - (2*I)*b*Sin[2*e] + 2*Sqrt[a]*Sqrt[a + b]*S qrt[(Cos[e] - I*Sin[e])^2]*Sin[f*x] + 2*Sqrt[a]*Sqrt[a + b]*Sqrt[(Cos[e] - I*Sin[e])^2]*Sin[2*e + f*x]]*Sec[e + f*x]*(Cos[e] - I*Sin[e]) - (8*a^2 + 8*a*b + 3*b^2)*(a + 2*b + a*Cos[2*(e + f*x)])^2*Log[-a - 2*(a + b)*Cos[2*e ] + a*Cos[2*(e + f*x)] + (2*I)*a*Sin[2*e] + (2*I)*b*Sin[2*e] + 2*Sqrt[a]*S qrt[a + b]*Sqrt[(Cos[e] - I*Sin[e])^2]*Sin[f*x] + 2*Sqrt[a]*Sqrt[a + b]*Sq rt[(Cos[e] - I*Sin[e])^2]*Sin[2*e + f*x]]*Sec[e + f*x]*(Cos[e] - I*Sin[e]) + 2*(8*a^2 + 8*a*b + 3*b^2)*ArcTan[(2*Sin[e]*(I*a + I*b + I*(a + b)*Cos[2 *e] + Sqrt[a]*Sqrt[a + b]*Cos[f*x]*Sqrt[(Cos[e] - I*Sin[e])^2] - Sqrt[a]*S qrt[a + b]*Cos[2*e + f*x]*Sqrt[(Cos[e] - I*Sin[e])^2] + a*Sin[2*e] + b*Sin [2*e] - I*Sqrt[a]*Sqrt[a + b]*Sqrt[(Cos[e] - I*Sin[e])^2]*Sin[f*x] - I*Sqr t[a]*Sqrt[a + b]*Sqrt[(Cos[e] - I*Sin[e])^2]*Sin[2*e + f*x]))/(I*(a + 3*b) *Cos[e] + I*(a + b)*Cos[3*e] + I*a*Cos[e + 2*f*x] + I*a*Cos[3*e + 2*f*x] + 3*a*Sin[e] + b*Sin[e] + a*Sin[3*e] + b*Sin[3*e] + a*Sin[e + 2*f*x] - a*Si n[3*e + 2*f*x])]*(a + 2*b + a*Cos[2*(e + f*x)])^2*Sec[e + f*x]*(I*Cos[e...
Time = 0.30 (sec) , antiderivative size = 156, normalized size of antiderivative = 1.08, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3042, 4635, 315, 25, 298, 221}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sec (e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sec (e+f x)}{\left (a+b \sec (e+f x)^2\right )^3}dx\) |
\(\Big \downarrow \) 4635 |
\(\displaystyle \frac {\int \frac {\left (1-\sin ^2(e+f x)\right )^2}{\left (-a \sin ^2(e+f x)+a+b\right )^3}d\sin (e+f x)}{f}\) |
\(\Big \downarrow \) 315 |
\(\displaystyle \frac {-\frac {\int -\frac {-\left ((4 a+3 b) \sin ^2(e+f x)\right )+4 a+b}{\left (-a \sin ^2(e+f x)+a+b\right )^2}d\sin (e+f x)}{4 a (a+b)}-\frac {b \sin (e+f x) \left (1-\sin ^2(e+f x)\right )}{4 a (a+b) \left (-a \sin ^2(e+f x)+a+b\right )^2}}{f}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\frac {\int \frac {-\left ((4 a+3 b) \sin ^2(e+f x)\right )+4 a+b}{\left (-a \sin ^2(e+f x)+a+b\right )^2}d\sin (e+f x)}{4 a (a+b)}-\frac {b \sin (e+f x) \left (1-\sin ^2(e+f x)\right )}{4 a (a+b) \left (-a \sin ^2(e+f x)+a+b\right )^2}}{f}\) |
\(\Big \downarrow \) 298 |
\(\displaystyle \frac {\frac {\frac {\left (8 a^2+8 a b+3 b^2\right ) \int \frac {1}{-a \sin ^2(e+f x)+a+b}d\sin (e+f x)}{2 a (a+b)}-\frac {3 b (2 a+b) \sin (e+f x)}{2 a (a+b) \left (-a \sin ^2(e+f x)+a+b\right )}}{4 a (a+b)}-\frac {b \sin (e+f x) \left (1-\sin ^2(e+f x)\right )}{4 a (a+b) \left (-a \sin ^2(e+f x)+a+b\right )^2}}{f}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle \frac {\frac {\frac {\left (8 a^2+8 a b+3 b^2\right ) \text {arctanh}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+b}}\right )}{2 a^{3/2} (a+b)^{3/2}}-\frac {3 b (2 a+b) \sin (e+f x)}{2 a (a+b) \left (-a \sin ^2(e+f x)+a+b\right )}}{4 a (a+b)}-\frac {b \sin (e+f x) \left (1-\sin ^2(e+f x)\right )}{4 a (a+b) \left (-a \sin ^2(e+f x)+a+b\right )^2}}{f}\) |
(-1/4*(b*Sin[e + f*x]*(1 - Sin[e + f*x]^2))/(a*(a + b)*(a + b - a*Sin[e + f*x]^2)^2) + (((8*a^2 + 8*a*b + 3*b^2)*ArcTanh[(Sqrt[a]*Sin[e + f*x])/Sqrt [a + b]])/(2*a^(3/2)*(a + b)^(3/2)) - (3*b*(2*a + b)*Sin[e + f*x])/(2*a*(a + b)*(a + b - a*Sin[e + f*x]^2)))/(4*a*(a + b)))/f
3.3.8.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x /Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2), x_Symbol] :> Simp[(-( b*c - a*d))*x*((a + b*x^2)^(p + 1)/(2*a*b*(p + 1))), x] - Simp[(a*d - b*c*( 2*p + 3))/(2*a*b*(p + 1)) Int[(a + b*x^2)^(p + 1), x], x] /; FreeQ[{a, b, c, d, p}, x] && NeQ[b*c - a*d, 0] && (LtQ[p, -1] || ILtQ[1/2 + p, 0])
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Sim p[(a*d - c*b)*x*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q - 1)/(2*a*b*(p + 1))), x] - Simp[1/(2*a*b*(p + 1)) Int[(a + b*x^2)^(p + 1)*(c + d*x^2)^(q - 2)*S imp[c*(a*d - c*b*(2*p + 3)) + d*(a*d*(2*(q - 1) + 1) - b*c*(2*(p + q) + 1)) *x^2, x], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && LtQ[p, - 1] && GtQ[q, 1] && IntBinomialQ[a, b, c, d, 2, p, q, x]
Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_ ))^(p_), x_Symbol] :> With[{ff = FreeFactors[Sin[e + f*x], x]}, Simp[ff/f Subst[Int[ExpandToSum[b + a*(1 - ff^2*x^2)^(n/2), x]^p/(1 - ff^2*x^2)^((m + n*p + 1)/2), x], x, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && In tegerQ[(m - 1)/2] && IntegerQ[n/2] && IntegerQ[p]
Time = 1.66 (sec) , antiderivative size = 142, normalized size of antiderivative = 0.99
method | result | size |
derivativedivides | \(\frac {-\frac {-\frac {b \left (8 a +5 b \right ) \sin \left (f x +e \right )^{3}}{8 a \left (a^{2}+2 a b +b^{2}\right )}+\frac {\left (8 a +3 b \right ) b \sin \left (f x +e \right )}{8 a^{2} \left (a +b \right )}}{\left (a \sin \left (f x +e \right )^{2}-a -b \right )^{2}}+\frac {\left (8 a^{2}+8 a b +3 b^{2}\right ) \operatorname {arctanh}\left (\frac {a \sin \left (f x +e \right )}{\sqrt {a \left (a +b \right )}}\right )}{8 \left (a^{2}+2 a b +b^{2}\right ) a^{2} \sqrt {a \left (a +b \right )}}}{f}\) | \(142\) |
default | \(\frac {-\frac {-\frac {b \left (8 a +5 b \right ) \sin \left (f x +e \right )^{3}}{8 a \left (a^{2}+2 a b +b^{2}\right )}+\frac {\left (8 a +3 b \right ) b \sin \left (f x +e \right )}{8 a^{2} \left (a +b \right )}}{\left (a \sin \left (f x +e \right )^{2}-a -b \right )^{2}}+\frac {\left (8 a^{2}+8 a b +3 b^{2}\right ) \operatorname {arctanh}\left (\frac {a \sin \left (f x +e \right )}{\sqrt {a \left (a +b \right )}}\right )}{8 \left (a^{2}+2 a b +b^{2}\right ) a^{2} \sqrt {a \left (a +b \right )}}}{f}\) | \(142\) |
risch | \(\frac {i b \left (8 a^{2} {\mathrm e}^{7 i \left (f x +e \right )}+5 a b \,{\mathrm e}^{7 i \left (f x +e \right )}+8 a^{2} {\mathrm e}^{5 i \left (f x +e \right )}+29 a b \,{\mathrm e}^{5 i \left (f x +e \right )}+12 b^{2} {\mathrm e}^{5 i \left (f x +e \right )}-8 a^{2} {\mathrm e}^{3 i \left (f x +e \right )}-29 a b \,{\mathrm e}^{3 i \left (f x +e \right )}-12 b^{2} {\mathrm e}^{3 i \left (f x +e \right )}-8 a^{2} {\mathrm e}^{i \left (f x +e \right )}-5 a b \,{\mathrm e}^{i \left (f x +e \right )}\right )}{4 a^{2} \left (a +b \right )^{2} f \left (a \,{\mathrm e}^{4 i \left (f x +e \right )}+2 a \,{\mathrm e}^{2 i \left (f x +e \right )}+4 b \,{\mathrm e}^{2 i \left (f x +e \right )}+a \right )^{2}}+\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (f x +e \right )}}{\sqrt {a^{2}+a b}}-1\right )}{2 \sqrt {a^{2}+a b}\, \left (a +b \right )^{2} f}+\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (f x +e \right )}}{\sqrt {a^{2}+a b}}-1\right ) b}{2 \sqrt {a^{2}+a b}\, \left (a +b \right )^{2} f a}+\frac {3 \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (f x +e \right )}}{\sqrt {a^{2}+a b}}-1\right ) b^{2}}{16 \sqrt {a^{2}+a b}\, \left (a +b \right )^{2} f \,a^{2}}-\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (f x +e \right )}}{\sqrt {a^{2}+a b}}-1\right )}{2 \sqrt {a^{2}+a b}\, \left (a +b \right )^{2} f}-\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (f x +e \right )}}{\sqrt {a^{2}+a b}}-1\right ) b}{2 \sqrt {a^{2}+a b}\, \left (a +b \right )^{2} f a}-\frac {3 \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (f x +e \right )}}{\sqrt {a^{2}+a b}}-1\right ) b^{2}}{16 \sqrt {a^{2}+a b}\, \left (a +b \right )^{2} f \,a^{2}}\) | \(543\) |
1/f*(-(-1/8*b*(8*a+5*b)/a/(a^2+2*a*b+b^2)*sin(f*x+e)^3+1/8*(8*a+3*b)/a^2*b /(a+b)*sin(f*x+e))/(a*sin(f*x+e)^2-a-b)^2+1/8*(8*a^2+8*a*b+3*b^2)/(a^2+2*a *b+b^2)/a^2/(a*(a+b))^(1/2)*arctanh(a*sin(f*x+e)/(a*(a+b))^(1/2)))
Leaf count of result is larger than twice the leaf count of optimal. 294 vs. \(2 (136) = 272\).
Time = 0.29 (sec) , antiderivative size = 613, normalized size of antiderivative = 4.26 \[ \int \frac {\sec (e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=\left [\frac {{\left ({\left (8 \, a^{4} + 8 \, a^{3} b + 3 \, a^{2} b^{2}\right )} \cos \left (f x + e\right )^{4} + 8 \, a^{2} b^{2} + 8 \, a b^{3} + 3 \, b^{4} + 2 \, {\left (8 \, a^{3} b + 8 \, a^{2} b^{2} + 3 \, a b^{3}\right )} \cos \left (f x + e\right )^{2}\right )} \sqrt {a^{2} + a b} \log \left (-\frac {a \cos \left (f x + e\right )^{2} - 2 \, \sqrt {a^{2} + a b} \sin \left (f x + e\right ) - 2 \, a - b}{a \cos \left (f x + e\right )^{2} + b}\right ) - 2 \, {\left (6 \, a^{3} b^{2} + 9 \, a^{2} b^{3} + 3 \, a b^{4} + {\left (8 \, a^{4} b + 13 \, a^{3} b^{2} + 5 \, a^{2} b^{3}\right )} \cos \left (f x + e\right )^{2}\right )} \sin \left (f x + e\right )}{16 \, {\left ({\left (a^{8} + 3 \, a^{7} b + 3 \, a^{6} b^{2} + a^{5} b^{3}\right )} f \cos \left (f x + e\right )^{4} + 2 \, {\left (a^{7} b + 3 \, a^{6} b^{2} + 3 \, a^{5} b^{3} + a^{4} b^{4}\right )} f \cos \left (f x + e\right )^{2} + {\left (a^{6} b^{2} + 3 \, a^{5} b^{3} + 3 \, a^{4} b^{4} + a^{3} b^{5}\right )} f\right )}}, -\frac {{\left ({\left (8 \, a^{4} + 8 \, a^{3} b + 3 \, a^{2} b^{2}\right )} \cos \left (f x + e\right )^{4} + 8 \, a^{2} b^{2} + 8 \, a b^{3} + 3 \, b^{4} + 2 \, {\left (8 \, a^{3} b + 8 \, a^{2} b^{2} + 3 \, a b^{3}\right )} \cos \left (f x + e\right )^{2}\right )} \sqrt {-a^{2} - a b} \arctan \left (\frac {\sqrt {-a^{2} - a b} \sin \left (f x + e\right )}{a + b}\right ) + {\left (6 \, a^{3} b^{2} + 9 \, a^{2} b^{3} + 3 \, a b^{4} + {\left (8 \, a^{4} b + 13 \, a^{3} b^{2} + 5 \, a^{2} b^{3}\right )} \cos \left (f x + e\right )^{2}\right )} \sin \left (f x + e\right )}{8 \, {\left ({\left (a^{8} + 3 \, a^{7} b + 3 \, a^{6} b^{2} + a^{5} b^{3}\right )} f \cos \left (f x + e\right )^{4} + 2 \, {\left (a^{7} b + 3 \, a^{6} b^{2} + 3 \, a^{5} b^{3} + a^{4} b^{4}\right )} f \cos \left (f x + e\right )^{2} + {\left (a^{6} b^{2} + 3 \, a^{5} b^{3} + 3 \, a^{4} b^{4} + a^{3} b^{5}\right )} f\right )}}\right ] \]
[1/16*(((8*a^4 + 8*a^3*b + 3*a^2*b^2)*cos(f*x + e)^4 + 8*a^2*b^2 + 8*a*b^3 + 3*b^4 + 2*(8*a^3*b + 8*a^2*b^2 + 3*a*b^3)*cos(f*x + e)^2)*sqrt(a^2 + a* b)*log(-(a*cos(f*x + e)^2 - 2*sqrt(a^2 + a*b)*sin(f*x + e) - 2*a - b)/(a*c os(f*x + e)^2 + b)) - 2*(6*a^3*b^2 + 9*a^2*b^3 + 3*a*b^4 + (8*a^4*b + 13*a ^3*b^2 + 5*a^2*b^3)*cos(f*x + e)^2)*sin(f*x + e))/((a^8 + 3*a^7*b + 3*a^6* b^2 + a^5*b^3)*f*cos(f*x + e)^4 + 2*(a^7*b + 3*a^6*b^2 + 3*a^5*b^3 + a^4*b ^4)*f*cos(f*x + e)^2 + (a^6*b^2 + 3*a^5*b^3 + 3*a^4*b^4 + a^3*b^5)*f), -1/ 8*(((8*a^4 + 8*a^3*b + 3*a^2*b^2)*cos(f*x + e)^4 + 8*a^2*b^2 + 8*a*b^3 + 3 *b^4 + 2*(8*a^3*b + 8*a^2*b^2 + 3*a*b^3)*cos(f*x + e)^2)*sqrt(-a^2 - a*b)* arctan(sqrt(-a^2 - a*b)*sin(f*x + e)/(a + b)) + (6*a^3*b^2 + 9*a^2*b^3 + 3 *a*b^4 + (8*a^4*b + 13*a^3*b^2 + 5*a^2*b^3)*cos(f*x + e)^2)*sin(f*x + e))/ ((a^8 + 3*a^7*b + 3*a^6*b^2 + a^5*b^3)*f*cos(f*x + e)^4 + 2*(a^7*b + 3*a^6 *b^2 + 3*a^5*b^3 + a^4*b^4)*f*cos(f*x + e)^2 + (a^6*b^2 + 3*a^5*b^3 + 3*a^ 4*b^4 + a^3*b^5)*f)]
\[ \int \frac {\sec (e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=\int \frac {\sec {\left (e + f x \right )}}{\left (a + b \sec ^{2}{\left (e + f x \right )}\right )^{3}}\, dx \]
Time = 0.27 (sec) , antiderivative size = 233, normalized size of antiderivative = 1.62 \[ \int \frac {\sec (e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=-\frac {\frac {{\left (8 \, a^{2} + 8 \, a b + 3 \, b^{2}\right )} \log \left (\frac {a \sin \left (f x + e\right ) - \sqrt {{\left (a + b\right )} a}}{a \sin \left (f x + e\right ) + \sqrt {{\left (a + b\right )} a}}\right )}{{\left (a^{4} + 2 \, a^{3} b + a^{2} b^{2}\right )} \sqrt {{\left (a + b\right )} a}} - \frac {2 \, {\left ({\left (8 \, a^{2} b + 5 \, a b^{2}\right )} \sin \left (f x + e\right )^{3} - {\left (8 \, a^{2} b + 11 \, a b^{2} + 3 \, b^{3}\right )} \sin \left (f x + e\right )\right )}}{a^{6} + 4 \, a^{5} b + 6 \, a^{4} b^{2} + 4 \, a^{3} b^{3} + a^{2} b^{4} + {\left (a^{6} + 2 \, a^{5} b + a^{4} b^{2}\right )} \sin \left (f x + e\right )^{4} - 2 \, {\left (a^{6} + 3 \, a^{5} b + 3 \, a^{4} b^{2} + a^{3} b^{3}\right )} \sin \left (f x + e\right )^{2}}}{16 \, f} \]
-1/16*((8*a^2 + 8*a*b + 3*b^2)*log((a*sin(f*x + e) - sqrt((a + b)*a))/(a*s in(f*x + e) + sqrt((a + b)*a)))/((a^4 + 2*a^3*b + a^2*b^2)*sqrt((a + b)*a) ) - 2*((8*a^2*b + 5*a*b^2)*sin(f*x + e)^3 - (8*a^2*b + 11*a*b^2 + 3*b^3)*s in(f*x + e))/(a^6 + 4*a^5*b + 6*a^4*b^2 + 4*a^3*b^3 + a^2*b^4 + (a^6 + 2*a ^5*b + a^4*b^2)*sin(f*x + e)^4 - 2*(a^6 + 3*a^5*b + 3*a^4*b^2 + a^3*b^3)*s in(f*x + e)^2))/f
Time = 0.34 (sec) , antiderivative size = 178, normalized size of antiderivative = 1.24 \[ \int \frac {\sec (e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=-\frac {\frac {{\left (8 \, a^{2} + 8 \, a b + 3 \, b^{2}\right )} \arctan \left (\frac {a \sin \left (f x + e\right )}{\sqrt {-a^{2} - a b}}\right )}{{\left (a^{4} + 2 \, a^{3} b + a^{2} b^{2}\right )} \sqrt {-a^{2} - a b}} - \frac {8 \, a^{2} b \sin \left (f x + e\right )^{3} + 5 \, a b^{2} \sin \left (f x + e\right )^{3} - 8 \, a^{2} b \sin \left (f x + e\right ) - 11 \, a b^{2} \sin \left (f x + e\right ) - 3 \, b^{3} \sin \left (f x + e\right )}{{\left (a^{4} + 2 \, a^{3} b + a^{2} b^{2}\right )} {\left (a \sin \left (f x + e\right )^{2} - a - b\right )}^{2}}}{8 \, f} \]
-1/8*((8*a^2 + 8*a*b + 3*b^2)*arctan(a*sin(f*x + e)/sqrt(-a^2 - a*b))/((a^ 4 + 2*a^3*b + a^2*b^2)*sqrt(-a^2 - a*b)) - (8*a^2*b*sin(f*x + e)^3 + 5*a*b ^2*sin(f*x + e)^3 - 8*a^2*b*sin(f*x + e) - 11*a*b^2*sin(f*x + e) - 3*b^3*s in(f*x + e))/((a^4 + 2*a^3*b + a^2*b^2)*(a*sin(f*x + e)^2 - a - b)^2))/f
Time = 0.33 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.03 \[ \int \frac {\sec (e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=\frac {\frac {{\sin \left (e+f\,x\right )}^3\,\left (5\,b^2+8\,a\,b\right )}{8\,a\,{\left (a+b\right )}^2}-\frac {\sin \left (e+f\,x\right )\,\left (3\,b^2+8\,a\,b\right )}{8\,a^2\,\left (a+b\right )}}{f\,\left (2\,a\,b+a^2+b^2-{\sin \left (e+f\,x\right )}^2\,\left (2\,a^2+2\,b\,a\right )+a^2\,{\sin \left (e+f\,x\right )}^4\right )}+\frac {\mathrm {atanh}\left (\frac {\sqrt {a}\,\sin \left (e+f\,x\right )}{\sqrt {a+b}}\right )\,\left (8\,a^2+8\,a\,b+3\,b^2\right )}{8\,a^{5/2}\,f\,{\left (a+b\right )}^{5/2}} \]